//
//  CityCollectionViewCell.m
//  PaiLeXiongProject
//
//  Created by 小獾科技 on 2017/9/26.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "CityCollectionViewCell.h"

@implementation CityCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if(self = [super initWithFrame:frame])
    {
        _cityLabel = [UILabel new];
        _cityLabel.layer.borderWidth = 1;
        _cityLabel.layer.borderColor = ColorFrom16(0xFEDE6D).CGColor;
        _cityLabel.textColor = ColorFrom16(0x666666);
        _cityLabel.font = PFRFONT(14);
        _cityLabel.textAlignment = 1;
        [self addSubview:_cityLabel];
        [_cityLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
//            make.left.equalTo(self).offset(22);
//            make.right.equalTo(self).offset(-5);
            make.left.and.right.equalTo(self);
            make.height.equalTo(@36);
            make.width.greaterThanOrEqualTo(@80);
        }];
    }
    return self;
}

- (void)configViewWithModel:(CityModel *)model
{
    _cityLabel.text = model.city_name;
}

@end
